package main

import (
	"fmt"
)

func main() {
	fmt.Println(result(10, 20))
	fmt.Println(result2(10, 20))
}

// 返回值和返回值的类型对应，顺序不能差
func result (num1 int, num2 int) (int, int)  {
	sum := num1 + num2
	sub := num1 - num2
	return sum, sub 
}

// 对函数返回值命名，里面顺序就无所谓了，顺序不用对应
func result2 (num1 int, num2 int) (sum int, sub int)  {
	sum = num1 + num2
	sub = num1 - num2
	return
}